#include "widget.h"
#include "ui_widget.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QVBoxLayout* layout = new QVBoxLayout();
    QPushButton* button1 = new QPushButton("按钮1");
    QPushButton* button2 = new QPushButton("按钮2");
    QPushButton* button3 = new QPushButton("按钮3");
    QPushButton* button4 = new QPushButton("按钮4");
    QHBoxLayout* layout2 = new QHBoxLayout();
    layout->addWidget(button1);
    layout->addWidget(button2);
    layout2->addWidget(button3);
    layout2->addWidget(button4);
    layout->addLayout(layout2);
    this->setLayout(layout);

}

Widget::~Widget()
{
    delete ui;
}

